/*
 * Equation.h
 *
 *  Created on: Feb 28, 2011
 *      Author: wjfortin
 */

/** \file Equation.h
 * \brief Header file for Equation class.
 *
 */

#ifndef EQUATION_H_
#define EQUATION_H_

#include <vector>
#include "../data/Quantity.h"
#include "../data/Concentration.h"

using namespace std;

/** \brief Equation class, which stores and computes the equations for rate constants.
 *
 *	Currently only handles multiplication.
 */
class Term {
public:

	Term();
	Term(Quantity*);
	Term(double);
	virtual ~Term();

	/** \brief Computes and returns the current value of the equation.
	 *
	 *	\return The current value of the equation.
	 */
	double getValue();

	/** \brief Computes and returns the current value of the equation.
	 *
	 *	\param rkStep the current step of the current rk iteration
	 *
	 *	\return The current value of the equation.
	 */
	double getValue(int rkStep);

	/** \brief Adds the specified factor to the Equation.
	 *
	 *	\param quantity The Quantity object to add.
	 */
	void addFactor(Quantity* quantity);

	void setFactor(int index, double newRate);

private:

	/** \brief Adds the specified factor to the Equation.
	 *
	 *	\param q The Quantity object to add.
	 */
	vector<Quantity*> factors;
};

#endif /* EQUATION_H_ */
